﻿using AutoMapper;
using Details.API.Application.Command.Goods;
using Details.API.Application.Handler.Goods;
using Details.API.DTOs;
using Domain;

namespace Details.API
{
    /// <summary>
    /// 关于Automapper的映射
    /// </summary>
    public class AutomapperFiles:Profile
    {
        /// <summary>
        /// Automapper映射配置
        /// </summary>
        public AutomapperFiles()
        {
            //商品添加
            CreateMap<AddGoodsCommand, GoodsModel>();
            //商品列表
            CreateMap<GoodsModel, GoodsDTO>();
            //商品修改
            CreateMap<UpdateGoodsCommand, GoodsModel>();
        }
    }
}
